/*============================================================================
 PROJECT: Talklife
 FILE:    CDCIconButton.h
 AUTHOR:  Clark Kent
 DATE:    5/21/13
 =============================================================================*/

/*============================================================================
 IMPORT
 =============================================================================*/
#import <UIKit/UIKit.h>


/*============================================================================
 MACRO
 =============================================================================*/

/*============================================================================
 PROTOCOL
 =============================================================================*/

/*============================================================================
 Interface:   CDCIconButton
 =============================================================================*/

@interface CDCIconButton : UIButton
@property (strong, nonatomic) UIActivityIndicatorView *indicatorView;
@property (strong, nonatomic) UIImageView *iconImageView;
@property (strong, nonatomic) UILabel *title;

@property (nonatomic, assign) BOOL isRetinalIconImage;
@property (strong, nonatomic) UIImage *iconImage;
@property (strong, nonatomic) NSString *text;
@property (assign, nonatomic) CGSize iconSize;
@property (assign, nonatomic) float iconTopMargin;
@property (assign, nonatomic) float iconLeftMargin;
@property (assign, nonatomic) float titleTopMargin;
@property (strong, nonatomic) UIColor *textColor;

@property (strong, nonatomic) NSMutableDictionary *backgroundColorStates;
@property (strong, nonatomic) NSMutableDictionary *textColorStates;
@property (strong, nonatomic) NSMutableDictionary *iconImageStates;
@property (strong, nonatomic) id userData;

#pragma mark - Mathods

- (void)createBaseUI;
- (void)updateGUIWithState:(UIControlState)state;
- (void)setIconImage:(UIImage *)iconImage forState:(UIControlState)state;
- (void)setIconImageWithUrl:(NSString *)imageUrl forState:(UIControlState)state;
- (void)setBackgroundColor:(UIColor *)backgroundColor forState:(UIControlState)state;
- (void)setTextColor:(UIColor *)textColor forState:(UIControlState)state;
- (void)showIndicatorView:(BOOL)status;

@end
